﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GalleryManager.ascx.cs" Inherits="Web.Cms.Gallery.GalleryManager" %>
<%@ Register src="../AjaxCP/Paging.ascx" tagname="Paging" tagprefix="uc1" %>

<script type="text/javascript">
    $(function () {
        $("#<%=txtDatefrom.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/App_Themes/Default/Images/calendar_red.gif', buttonImageOnly: true, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true });
        $("#<%=txtDateTo.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/App_Themes/Default/Images/calendar_red.gif', buttonImageOnly: true, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true });
    });
</script>
<div class="rows">
    <div class="fl width70 title-text"> <strong>Tiêu đề</strong></div>
    <div class="fl"><asp:TextBox ID="txtKeysearch" runat="server" Height="20px" CssClass="textbox-title"></asp:TextBox></div>    
</div>
<div class="cl5"></div>
<div class="rows">
    <div class="fl width70 title-text"><strong>Chuyên mục</strong></div>
    <div class="fl"><asp:DropDownList ID="dropZoneId" runat="server" CssClass="textbox-title" Height="20" Width="280"></asp:DropDownList>
    </div>
</div>
<div class="cl5"></div>
<div>
    <div class="fl width70 title-text"> <b>Từ ngày</b></div>
    <div class="fl"><asp:TextBox ID="txtDatefrom" runat="server" Height="20px" Width="70"></asp:TextBox></div>
    <div class="fl title-text"><b>Đến ngày</b></div>
    <div class="fl"><asp:TextBox ID="txtDateTo" runat="server" Height="20px" Width="70"></asp:TextBox></div>    
</div>
<div class="cl5"></div>
<div style="display:none;">
    <div class="fl width70 title-text"> <b>Kiểu ảnh</b></div>
    <div class="fl">
        <asp:CheckBox ID="chkVideoNoiBat" runat="server" Text="Ảnh nổi bật" />
        <asp:CheckBox ID="chkVideoMoiNhat" runat="server"  Text="Ảnh mới nhất"/>
        </div>
   </div>
<div class="cl5"></div>
<div class="rows">
    <div class="fl width70 title-text"></div>
    <div class="fl">
        <asp:Button runat="server" ID="btnTimKiem" CssClass="Button_Search" OnClick="btnTimKiem_Click"/>
        <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/Gallery/AddEditGallery.aspx','Thêm Mới Ảnh',750,550,null,__doPostBack)">
        <img src="/App_Themes/Default/Images/Add_b.gif" border="0" /></a>
    </div>
</div>
<div class="cl5"></div>
<div style=" padding-left:50px;"><asp:Label Font-Bold="true" ForeColor="red" Font-Size="11px" ID="lblMessage" runat="server"></asp:Label></div>
<div class="cl5"></div>
<p class="heading">Danh sách ảnh</p>
<div class="cl5"></div>
<asp:GridView ID="grdData" runat="server" SkinID="AdminGridView" 
    BackColor="White" AutoGenerateColumns="False" onrowcommand="grdData_RowCommand">
    <Columns>               
         <asp:BoundField HeaderText="STT">
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle />
        </asp:BoundField>                   
        <asp:TemplateField HeaderText="Tiêu đề ảnh" HeaderStyle-Width="315">
            <ItemTemplate>       
            <a class="Headline" style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/Gallery/AddEditGallery.aspx?galleryId=<%# Eval("GalleryId") %>','Chỉnh Sửa Thông Tin Ảnh',750,550,null,__doPostBack)"><%#Eval("Title")%></a>
            </ItemTemplate>                     
        </asp:TemplateField>                  
        
         <asp:TemplateField HeaderText="Chuyên mục">
           <ItemTemplate>
             <%#Eval("ChuyenMuc")%>
           </ItemTemplate>
         
         </asp:TemplateField>
        <asp:BoundField HeaderText="Thành viên cập nhật" DataField="CreatedBy" 
             HeaderStyle-Width="250">
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="center" />            
        </asp:BoundField> 
        
        <asp:TemplateField HeaderText="Ngày cập nhật">
            <ItemTemplate>    
            <%# Convert.ToDateTime(Eval("CreatedOn")).ToString("dd/MM/yyyy HH:mm:ss")%>  
                                                                
            </ItemTemplate>
           <HeaderStyle Width="250px"></HeaderStyle> <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>                  
         <asp:TemplateField HeaderText="Status" HeaderStyle-Width="20" Visible="false">
           <ItemTemplate>
             <asp:ImageButton ID="btnStatus" runat="server" CommandArgument='<%# Eval("GalleryId") %>' CommandName="CommandStatus" />   
           </ItemTemplate>
         </asp:TemplateField>
        <asp:TemplateField HeaderText="Sửa" HeaderStyle-Width="20">
            <ItemTemplate>                       
               <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/Gallery/AddEditGallery.aspx?galleryId=<%# Eval("GalleryId") %>','Chỉnh Sửa Thông Tin Ảnh',750,550,null,__doPostBack)">
                <img src="../../App_Themes/Default/Images/edit.gif" border="0"></a>                                     
            </ItemTemplate>

           <HeaderStyle Width="20px"></HeaderStyle>
        </asp:TemplateField>                   
        <asp:TemplateField HeaderText="Xóa" HeaderStyle-Width="20">
            <ItemTemplate>             
                <asp:Button ID="btnDelete" runat="server" CssClass="Icon_Delete" CommandArgument='<%# Eval("GalleryId") %>' CommandName="Commanddelete" OnClientClick="return confirm('Bạn có chắc chắn xóa không')" />                   
            </ItemTemplate>

            <HeaderStyle Width="20px"></HeaderStyle>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<div class="cl5"></div>
<p style="text-align:center;">
    &nbsp;<uc1:Paging ID="Paging1" runat="server" />
 
 </p>